﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace BankSimulation
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

            // 创建银行
            comboBox1.Items.Add("Bank A");
            comboBox1.Items.Add("Bank B");

            // 设置默认选中的银行
            comboBox1.SelectedIndex = 0;
        }


        private void button1_Click(object sender, EventArgs e)
        {
            // 获取所选银行
            string selectedBank = comboBox1.SelectedItem.ToString();
            int accountNumber = int.Parse(textBox2.Text);

            // 打开ATM界面
            Form2 atmForm = new Form2(selectedBank, accountNumber);
            atmForm.Show();

        }
    }


}
